2019 M08 20

The nlrx R package: A next‐generation framework for reproducible NetLogo model analyses

Motivation

Agent-based models are often complex and multidimensional

Typical model analyses, such as

  • parameter screenings
  • sensitivity analysis
  • Population viability analysis

… often require many runs with hundreds of different parameter combinations and a high computational effort!

Existing Tools

Some NetLogo tools already exist, each with its own caveats:

  • NetLogo GUI /NetLogo Code
    • Not efficient
  • NetLogo BehaviorSpace
    • Limitations
  • BehaviorSearch
    • Only optimization
  • RNetLogo (+ nlexperiment)
    • rJava issues
    • Setup needs lots of code

nlrx features

  • Run experiments directly from R
  • Reproducible workflow
  • Easy setup
  • Intuitive and simple workflow
  • Many experiment setup methods already builtin
  • Setup methods can be easily extended with own methods
  • Basic output analysis functions available for most experiment setup methods
  • Supports parallelisation, even on remote HPC machines

nlrx availability

nlrx workflow

Simdesign examples

Performance

Analysis Example I - Sensitivity Analysis

Analysis Example II - Genetic Algorithm

Visualization examples I

  • nlrx is also useful to collect agent related spatial data
  • such data can be used to create animated figures with enhanced visualization options (ggplot2, gganimate)

Visualization examples II

Contribute

  • Please report bugs and problems at our github
  • We are also very open to contributions and ideas to improve nlrx further

  • Big thanks to rOpenSci for reviewing and hosting our package!

Questions?